<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"> </script>
  <style>

  </style>
</head>
<body>
  <div id="app">
    <img :src="state?arr[0]:arr[1]" alt="">
    <button @click="toggle">toggle</button>
  </div>

  <script>
    /*
    https://img0.baidu.com/it/u=3427914122,4172181710&fm=253&fmt=auto&app=120&f=JPEG?w=386&h=481
   https://img0.baidu.com/it/u=3739817000,3402796750&fm=253&fmt=auto&app=138&f=JPEG?w=598&h=419
   
    */ 
    new Vue({
      el: "#app", 
      data: {  
        state: false,   
        arr:[
          "https://img0.baidu.com/it/u=3427914122,4172181710&fm=253&fmt=auto&app=120&f=JPEG?w=386&h=481",
          "https://img0.baidu.com/it/u=3739817000,3402796750&fm=253&fmt=auto&app=138&f=JPEG?w=598&h=419"
        ]
      },
      methods: {
        toggle() {
          console.log(this)
          this.state = !this.state
        }
      }
    })
  </script>
</body>
</html>